<template>
  <div
    id="app"
    ref="app"
    :class="{
      'animate__animated animate__fadeInLeft': show,
      'animate__animated animate__fadeOutLeft': !show,
    }"
  >
    <router-view></router-view>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  computed: {
    ...mapGetters(["show", "historyList"]),
  },
  mounted() {
    // vuex中数据给予默认值
    // 动画类存在，导致自定义标题栏drag失效，在动画结束后清除动画类，恢复drag移动
    setTimeout(() => {
      this.$refs.app.className = "";
    }, 1000);
  },
};
</script>

<style lang="scss">
@import url("@/icon/iconfont.css");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}
li {
  list-style: none;
}
a {
  text-decoration: none;
}
body {
  overflow: hidden;
}
#app {
  width: 740px;
  height: 410px;
  overflow: hidden;
}
.box {
  background: rgba($color: #fff, $alpha: 0.5);
  border-radius: 4px;
  padding: 10px;
}
.flex {
  display: flex;
}
/* 设置滚动条的样式 */
::-webkit-scrollbar {
  width: 0px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
  border-radius: 8px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba($color: #909399, $alpha: 0.8);
}
.center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
</style>
